<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.7.1.min.js"></script>
</head>
<body>
<div id="result"></div>
<button onclick="btnClick()">PUT</button>
<script>
    function btnClick() {
        $.ajax({
            url: "http://localhost:8080/hello",
            type: "PUT",
            headers: {
                "Authorization": "Basic " + btoa("javaboy:123")
            },
            success: function (data) {
                $("#result").html(data);
            }
        })
    }
</script>
</body>
</html>